import { ActivityIndicator } from "@ant-design/react-native";
import { View } from "react-native";
import React from "react";
import { windowHeight, windowWidth } from "../util";

interface  PropType {
  isLoading:boolean,
}

// 加载
const Index = ({isLoading = true}:PropType)=>{
  return(
    <View style={{width:windowWidth,height:windowHeight,position:"absolute",left:0,top:0, zIndex: 99999999,display:isLoading?"flex":"none"}}>
      <View style={{ position: "absolute", left: "50%", top: "30%"}}>
        {/*加载*/}
        <ActivityIndicator toast size="large" text="加载中……" animating={isLoading} />
      </View>
    </View>
  )
}

export default Index;
